// Types
// (c) jimon game studio

#ifndef JEH_JETYPES
#define JEH_JETYPES

#include "Config_Engine.h"

#ifdef JE_MINGW
#include <iostream>
#endif

#ifdef JE_GCC
#include <cstddef>
#endif

namespace je
{
	//! u1
	typedef bool u1;

	//! unsigned char (0 - 255)
	typedef unsigned char u8;

	//! signed char (-127 - 127)
	typedef signed char	s8;

	//! char (0-255)
	typedef char c8;

	//! unsigned short (0-65535)
	typedef unsigned short u16;

	//! signed short (-32677 - 32677)
	typedef signed short s16;

	//! unsigned int
	typedef unsigned int u32;

	//! signed int
	typedef signed int s32;

	//! float
	typedef float f32;

	//! double
	typedef double f64;

	//! size_t
	typedef size_t je_size_t;

	//! wchar_t
	#ifdef JE_LINUX
	typedef s16 je_wchar_t; // bad tweak :(
	#else
	typedef wchar_t je_wchar_t;
	#endif

	//! null
	#ifndef NULL
	#define NULL 0
	#endif

	// Unicode stuff
	#ifdef JE_UNICODE
		//! unicode char type
		typedef je_wchar_t jeschar;

		//!	make unicode
		#define _U(__v__) L##__v__
	#else
		//! ansi char type
		typedef char jeschar;

		//! no convert
		#define _U(__v__) __v__
	#endif

};

#endif
